package structure.facade;

import cn.hutool.core.io.IoUtil;
import org.apache.commons.io.IOUtils;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.file.Files;

public class FileWriter {
    public void write(String middleData, String targetPath) throws IOException {
        File file = new File(targetPath);
        IOUtils.write(middleData, Files.newOutputStream(file.toPath()));
    }
}
